package com.webproject.dao.impl.equipmentManager;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.webproject.core.Page;
import com.webproject.dao.equipmentManager.EquipmentManagerDao;
import com.webproject.entity.equipmentManager.Equipment;
import com.webproject.entity.equipmentManager.EquipmentCheckup;
import com.webproject.entity.equipmentManager.EquipmentType;

public class EquipmentManagerDaoImpl extends SqlMapClientDaoSupport implements EquipmentManagerDao{

	@Override
	public List<Equipment> queryEquipment(Page page) {
		// TODO Auto-generated constructor stub
		return getSqlMapClientTemplate().queryForList("equipmentManager.queryEquipment",page);
	}

	@Override
	public int queryEquipmentCount(Page page) {
		// TODO Auto-generated constructor stub
		return (Integer) getSqlMapClientTemplate().queryForObject("equipmentManager.queryEquipmentCount",page);
	}

	@Override
	public void saveEquipment(Equipment equipment) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().insert("equipmentManager.saveEquipment", equipment);
	}

	@Override
	public void updateEquipment(Equipment equipment) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().update("equipmentManager.updateEquipment", equipment);
	}

	@Override
	public void deleteEquipment(Equipment equipment) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().delete("equipmentManager.deleteEquipment", equipment);
	}

	@Override
	public List<EquipmentCheckup> queryEquipmentCheckup(Page page) {
		// TODO Auto-generated constructor stub
		return getSqlMapClientTemplate().queryForList("equipmentManager.queryEquipmentCheckup", page);
	}

	@Override
	public int queryEquipmentCheckupCount(Page page) {
		// TODO Auto-generated constructor stub
		return (Integer) getSqlMapClientTemplate().queryForObject("equipmentManager.queryEquipmentCheckupCount", page);
	}

	@Override
	public void saveEquipmentCheckup(EquipmentCheckup equipmentCheckup) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().insert("equipmentManager.saveEquipmentCheckup", equipmentCheckup);
	}

	@Override
	public void updateEquipmentCheckup(EquipmentCheckup equipmentCheckup) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().update("equipmentManager.updateEquipmentCheckup", equipmentCheckup);
	}

	@Override
	public void deleteEquipmentCheckup(EquipmentCheckup equipmentCheckup) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().delete("equipmentManager.deleteEquipmentCheckup", equipmentCheckup);
	}

	@Override
	public List<EquipmentType> queryEquipmentType(Page page) {
		// TODO Auto-generated constructor stub
		return getSqlMapClientTemplate().queryForList("equipmentManager.queryEquipmentType", page);
	}

	@Override
	public int queryEquipmentTypeCount(Page page) {
		// TODO Auto-generated constructor stub
		return (Integer) getSqlMapClientTemplate().queryForObject("equipmentManager.queryEquipmentTypeCount", page);
	}

	@Override
	public void saveEquipmentType(EquipmentType type) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().insert("equipmentManager.saveEquipmentType", type);
	}

	@Override
	public void updateEquipmentType(EquipmentType type) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().update("equipmentManager.updateEquipmentType", type);
	}

	@Override
	public void deleteEquipmentType(EquipmentType type) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().delete("equipmentManager.deleteEquipmentType", type);
	}

}
